﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StockTrading
{
   public class User
    {
        [Required]
        [Column("id")]
        //用户id
        public int Id { get; set; }

        [Required]
        [Column("name")]
        //用户姓名
        public string Name { get; set; }

        [Required]
        [Column("login_name")]
        //登录账号名
        public string LoginName { get; set; }

        [MaxLength(16)]
        [Required]
        [Column("password")]
        //用户密码
        public string Password { get; set; }

        [Required]
        [Column("type")]
        //用户类型,0表示普通用户，1表示管理员
        public bool IsAdmin { get; set; }
        
        
        [Required]
        [Column("cny_free")]
        //用户余额
        public double CnyFree { get; set; }
        [Required]
        [Column("cny_freezed")]
        
        //冻结金额
        public double CnyFreezed { get; set; }

    }
}
